﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DTO;
using DataAccess;
namespace Business
{
    public static class TeamBUS
    {
        public static List<TeamDTO> GetTeamList()
        {
            return TeamDAO.GetTeamList();
        }

        public static bool AddNewTeam(TeamDTO dtoTeam)
        {
            return TeamDAO.AddNewTeam(dtoTeam);
        }

        public static bool IsTeamNameExists(TeamDTO dtoTeam)
        {
            return TeamDAO.FindTeam(dtoTeam , TeamColumns .TEAM_NAME ) != null;
        }        

        public static TeamDTO FindTeam(TeamDTO dtoTeam, string searchOption)
        {
            return TeamDAO.FindTeam(dtoTeam, searchOption);
        }

        public static bool UpdateTeam(TeamDTO dtoTeam)
        {
            return TeamDAO .UpdateTeam (dtoTeam );
        }

        public static bool DeleteATeam(TeamDTO dtoTeam)
        {
            return TeamDAO.DeleteATeam(dtoTeam);
        }
        public static bool DeleteAllTeam()
        {
            return TeamDAO.DeleteAllTeam();
        }
    }
}
